﻿using Inovout.Cloud.Models;
using Inovout.Cloud.Web.Mvc;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;

namespace Inovout.Cloud.Console.Web.Controllers
{
    public class ProductController : CloudController<Product>
    {
        public ActionResult My()
        {
            var products = base.RepositoryService.FindAll();
            products = products.OrderByDescending(s => Project.IsProductInProject(s)).ToList<Product>();
            ViewBag.Products = products;
            return View(Project.Products);
        }
    }
}